package com.smart.util;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

public class JsonUtil {
	public static <T> T fromJson(String json, Class<T> c) {
		Gson gson = new Gson();
		return gson.fromJson(json, c);
	}

	public static String toJson(Object obj) {
		Gson gson = new Gson();
		return gson.toJson(obj);
	}
}
